import App from './App'
import Layout from '@/layout/index.vue'
import uView from '@/uni_modules/uview-ui'
import store from '@/store/index.js'
import { smartGoBack }  from '@/utils/auth.js'
import './permission.js'
import './utils/globalMethod.js'
// 如果不是vue3 
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
Vue.prototype.$goBack = smartGoBack
Vue.component('Layout', Layout)
Vue.use(uView)
App.mpType = 'app'
const app = new Vue({
  ...App,
  store
})
app.$mount()


// 如果是vue3
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  // app.use(uView)
  app.component('Layout', Layout)
  return {
    app
  }
}
// #endif
